package com.shd.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by shanhaodong on 2018/8/31
 */
@RestController
public class HelloController {
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/helloworld")
    public String hello() {
        return restTemplate.getForEntity("http://EUREKA-PROVIDER/hello", String.class).getBody();
    }
}
